<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <slot :user="user" />
    <hr>
    <slot name="mn" />
    <slot name="mj" />
    <slot name="tt" />
    <hr>
    <slot name="sp" :test="test" :user="user" :msg="msg">
      <h2 style="color:red">{{ msg }}</h2>
    </slot>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      test: 1000,
      user: { name: 'meng', age: 18 }
    }
  },
  props: {
    msg: {
      type: Number
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
